package com.bosssoft.cloud.wechat.infrastructure.enums;

import lombok.Getter;

/**
 * 返回Enum
 * <p>
 * 注意！！！
 * 目前前端所有对返回的code的判断逻辑是：
 * "0000"成功，其他为失败
 */
@Getter
public enum ResultEnum implements ReturnEnum {

    SUCCESS("0000", "成功"),

    /**
     * common
     */
    QUERY_SUCCESS("查询成功"),
    SEND_SUCCESS("发送成功"),
    PARSING_SUCCESS("解析成功"),
    /**
     * 用户相关
     */
    USER_SUCCESS("用户操作成功"),
    UNBIND_SUCCESS("解绑成功"),

    /**
     * 微信相关
     */
    WX_SUCCESS("微信操作成功"),
    ;

    public static final String SUCCESS_CODE = "0000";

    private final String code;
    private final String message;

    ResultEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    ResultEnum(String message) {
        this.code = SUCCESS_CODE;
        this.message = message;
    }
}
